package com.ncst.backend.mapper;

import com.ncst.backend.domain.InspectionRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 检验申请Mapper接口
 */
@Mapper
public interface InspectionRequestMapper {
    
    InspectionRequest selectById(@Param("id") Integer id);
    List<InspectionRequest> selectAll();
    List<InspectionRequest> selectByCondition(InspectionRequest inspectionRequest);
    List<InspectionRequest> selectByRegisterId(@Param("registerId") Integer registerId);
    List<InspectionRequest> selectByPage(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
    List<InspectionRequest> selectByPageWithCondition(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize, 
                                                     @Param("inspectionRequest") InspectionRequest inspectionRequest, 
                                                     @Param("startDate") String startDate, @Param("endDate") String endDate);
    Long countAll();
    Long countByCondition(InspectionRequest inspectionRequest);
    int insert(InspectionRequest inspectionRequest);
    int insertBatch(@Param("list") List<InspectionRequest> list);
    int updateById(InspectionRequest inspectionRequest);
    int deleteById(@Param("id") Integer id);
    int deleteByIds(@Param("ids") List<Integer> ids);
}